#ifndef DependencyParser2_H
#define DependencyParser2_H
#include "common.h"
#include<string>
#include<vector>
#include"ParserOptions.h"
#include"DependencyPipe.h"
#include"DependencyPipe2OSibling.h"
#include"DependencyPipe2OGrandChildren.h"
#include"DependencyPipe2O.h"
#include"DependencyPipe3OGSibling.h"
#include"DependencyPipe3OTSibling.h"
#include"DependencyPipe3O.h"
#include"DependencyPipe4OGTSibling.h"
using namespace std;


class DependencyParser2{
private:
	DependencyPipe* pipe;
	whatlog what_;
	void createForest(int thread_num, vector<DependencyInstance*> *instList);
	bool trainModel(vector<int> *instLengths, double *param, int maxiter, int thread_num, double C, double eta, bool orthant);
	void saveModel(string *file, double *param);

public:
	ParserOptions* options;
	DependencyParser2(DependencyPipe* pipe, ParserOptions* options);
	bool learn(string *train_file, string *model_file, double C, double eta, int maxiter, int thread_num, int algorithm);
	~DependencyParser2();
	const char* what() { return what_.str(); }
};
#endif

